Skip to content

Conversation

@jfischer-no
Copy link
Contributor

Adjust init level and priority of CDC ACM driver to regular serial drivers.
Limit scope of CONFIG_USB_UART_CONSOLE and finally remove this option.

zephyrproject-rtos/zephyr#40428

@jfischer-no
Copy link
Contributor Author

jfischer-no commented Nov 25, 2021

Probably we only need the first four commits, WIP.

MaureenHelm and others added 8 commits November 29, 2021 08:46
…riority Kconfig

Refactors all of the serial drivers to use a shared driver class
initialization priority configuration, CONFIG_SERIAL_INIT_PRIORITY, to
allow configuring serial drivers separately from other devices. This is
similar to other driver classes like I2C and SPI.

The default is set to CONFIG_KERNEL_INIT_PRIORITY_DEVICE to preserve the
existing default initialization priority for most drivers. The one
exception is uart_lpc11u6x.c which previously used
CONFIG_KERNEL_INIT_PRIORITY_OBJECTS.

This change was motivated by an issue on the frdm_k64f board where the
serial driver was incorrectly initialized before the clock control
driver.

Signed-off-by: Maureen Helm <[email protected]>
…al drivers

Use same init level and priority as serial drivers.
Align priority to the changes in
commit ad14505 ("drivers: serial: Refactor drivers
to use shared init priority Kconfig")

Signed-off-by: Johann Fischer <[email protected]>
Do not change init level and priority of console driver
if Kconfig option CONFIG_USB_UART_CONSOLE is enabled because
commit 37f4d9b
("usb: cdc_acm: rework cdc_acm_poll_out to non-blocking")
changed CDC ACM UART driver so that it more closely mimics
the real controller and CDC ACM UART driver now uses the same
init level and priority as regular serial driver.

Signed-off-by: Johann Fischer <[email protected]>
This sample uses console driver and therefore
Kconfig option CONFIG_CONSOLE and CONFIG_UART_CONSOLE
are required.

Kconfig option CONFIG_USB_UART_CONSOLE no longer has
any influence here and should be removed.

Signed-off-by: Johann Fischer <[email protected]>
Remove option CONFIG_USB_UART_CONSOLE where it has no influence
or enable CONFIG_SHELL_BACKEND_SERIAL_CHECK_DTR without taking
a detour through CONFIG_USB_UART_CONSOLE.

Check the compatibility of chosen property instead
of usage of CONFIG_USB_UART_CONSOLE option.
Align how to wait for the readiness of CDC ACM UART.

Signed-off-by: Johann Fischer <[email protected]>
Remove option CONFIG_USB_UART_CONSOLE where it has no influence
or enable CONFIG_SHELL_BACKEND_SERIAL_CHECK_DTR without taking
a detour through CONFIG_USB_UART_CONSOLE.

Check the compatibility of chosen property instead
of usage of CONFIG_USB_UART_CONSOLE option.

Signed-off-by: Johann Fischer <[email protected]>
These boards try to configure CDC ACM UART as backend used
by the console driver. CONFIG_USB_UART_CONSOLE has no more
influence to console driver any and can be removed.

Signed-off-by: Johann Fischer <[email protected]>
Since there are no more users and dependencies of
Kconfig option USB_UART_CONSOLE in the tree,
remove the remains and the option USB_UART_CONSOLE.

Signed-off-by: Johann Fischer <[email protected]>
@jfischer-no jfischer-no force-pushed the pr-remove-option-usb_uart_console branch from b47ac28 to 134e3e6 Compare November 29, 2021 07:46
@carlescufi carlescufi merged commit eb0a5b6 into nrfconnect:main Nov 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants